// vite.config.js
import { defineConfig, loadEnv } from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/vite@4.5.9_@types+node@22.13.5_sass@1.85.0_stylus@0.57.0/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vi_8562b45239ceca90b5b91edc2960f0db/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import AutoImport from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/unplugin-auto-import@0.15.3_b4dafac674964255bc15b4f2548e9b34/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/unplugin-vue-components@0.2_f7d0606f2f6789b4c95f48a455c4f34e/node_modules/unplugin-vue-components/dist/vite.mjs";
import { ElementPlusResolver } from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/unplugin-vue-components@0.2_f7d0606f2f6789b4c95f48a455c4f34e/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import { createSvgIconsPlugin } from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_d341b12da3446b4e5cf6ebfd0d806500/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import viteCompression from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/vite-plugin-compression@0.5_e4d20fce8415bb24e7b08d5a5203f2d2/node_modules/vite-plugin-compression/dist/index.mjs";
import { NaiveUiResolver } from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/unplugin-vue-components@0.2_f7d0606f2f6789b4c95f48a455c4f34e/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import eslintPlugin from "file:///D:/code/vue/admin_go_8080/node_modules/.pnpm/vite-plugin-eslint@1.8.1_es_96b919eb64433c1d795b091c32841116/node_modules/vite-plugin-eslint/dist/index.mjs";
var __vite_injected_original_dirname = "D:\\code\\vue\\admin_go_8080";
var vite_config_default = defineConfig(({ command }) => {
  return {
    plugins: [
      vue(),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/icons/svg")],
        symbolId: "icon-[dir]-[name]"
      }),
      // 自动引入内容
      AutoImport({
        imports: [
          "vue",
          "vue-router",
          "vue",
          {
            "naive-ui": [
              "useDialog",
              "useMessage",
              "useNotification",
              "useLoadingBar"
            ]
          }
        ],
        dirs: [
          "src/hooks/**",
          "src/stores/**",
          "src/utils/**"
        ],
        resolvers: [
          ElementPlusResolver(),
          NaiveUiResolver()
          // 启用 Naive UI 自动引入
        ],
        dts: "src/auto-import/imports.d.ts",
        eslintrc: {
          enabled: false
        }
      }),
      // 自动引入组件
      Components({
        dirs: [
          "src/components"
        ],
        // resolvers: command === 'build' ? [ElementPlusResolver()] : [],
        resolvers: [
          ElementPlusResolver(),
          NaiveUiResolver()
          // 启用 Naive UI 自动引入
        ],
        dts: "src/auto-import/components.d.ts"
      }),
      // eslint
      // eslintPlugin({
      //   include: ['src/**/*.js', 'src/**/*.vue', 'src/*.js', 'src/*.vue']
      // }),
      // 对大于 1k 的文件进行压缩
      viteCompression({
        threshold: 1e3
      })
    ],
    server: {
      host: true,
      port: 9526,
      open: true
    },
    resolve: {
      alias: {
        "@": path.resolve(__vite_injected_original_dirname, "src"),
        "vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js"
      }
    },
    build: {
      base: "./",
      rollupOptions: {
        // 静态资源分类打包
        output: {
          chunkFileNames: "static/js/[name]-[hash].js",
          entryFileNames: "static/js/[name]-[hash].js",
          assetFileNames: "static/[ext]/[name]-[hash].[ext]",
          // 静态资源分拆打包
          manualChunks(id) {
            if (id.includes("node_modules")) {
              if (id.toString().indexOf(".pnpm/") !== -1) {
                return id.toString().split(".pnpm/")[1].split("/")[0].toString();
              } else if (id.toString().indexOf("node_modules/") !== -1) {
                return id.toString().split("node_modules/")[1].split("/")[0].toString();
              }
            }
          }
        }
      },
      sourcemap: false,
      target: "es2015",
      reportCompressedSize: false
    }
  };
});
export {
  vite_config_default as default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AgICAgICAgICdzcmMvdXRpbHMvKionXHJcbiAgICAgICAgXSxcclxuICAgICAgICByZXNvbHZlcnM6IFtcclxuICAgICAgICAgIEVsZW1lbnRQbHVzUmVzb2x2ZXIoKSxcclxuICAgICAgICAgIE5haXZlVWlSZXNvbHZlcigpIC8vIFx1NTQyRlx1NzUyOCBOYWl2ZSBVSSBcdTgxRUFcdTUyQThcdTVGMTVcdTUxNjVcclxuICAgICAgICBdLFxyXG4gICAgICAgIGR0czogJ3NyYy9hdXRvLWltcG9ydC9pbXBvcnRzLmQudHMnLFxyXG4gICAgICAgIGVzbGludHJjOiB7XHJcbiAgICAgICAgICBlbmFibGVkOiBmYWxzZVxyXG4gICAgICAgIH1cclxuICAgICAgfSksXHJcbiAgICAgIC8vIFx1ODFFQVx1NTJBOFx1NUYxNVx1NTE2NVx1N0VDNFx1NEVGNlxyXG4gICAgICBDb21wb25lbnRzKHtcclxuICAgICAgICBkaXJzOiBbXHJcbiAgICAgICAgICAnc3JjL2NvbXBvbmVudHMnXHJcbiAgICAgICAgXSxcclxuICAgICAgICAvLyByZXNvbHZlcnM6IGNvbW1hbmQgPT09ICdidWlsZCcgPyBbRWxlbWVudFBsdXNSZXNvbHZlcigpXSA6IFtdLFxyXG5cclxuICAgICAgICByZXNvbHZlcnM6IFtcclxuICAgICAgICAgIEVsZW1lbnRQbHVzUmVzb2x2ZXIoKSxcclxuICAgICAgICAgIE5haXZlVWlSZXNvbHZlcigpIC8vIFx1NTQyRlx1NzUyOCBOYWl2ZSBVSSBcdTgxRUFcdTUyQThcdTVGMTVcdTUxNjVcclxuICAgICAgICBdLFxyXG5cclxuICAgICAgICBkdHM6ICdzcmMvYXV0by1pbXBvcnQvY29tcG9uZW50cy5kLnRzJyxcclxuXHJcbiAgICAgIH0pLFxyXG4gICAgICAvLyBlc2xpbnRcclxuICAgICAgLy8gZXNsaW50UGx1Z2luKHtcclxuICAgICAgLy8gICBpbmNsdWRlOiBbJ3NyYy8qKi8qLmpzJywgJ3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